package com.blueocean_health.care.management.controller.app;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.blueocean_health.care.management.domain.base.SysResult;
import com.blueocean_health.care.management.domain.dto.SingleServiceDto;
import com.blueocean_health.care.management.service.SingleSerService;
import com.github.pagehelper.PageInfo;

/**
 * 单项  2018年3月12日10:26:22
 * @author wuyanli
 *
 */
@RestController
@RequestMapping("app/static")
public class SinleServiceController {

	@Resource
	private SingleSerService singleService;
	/**
	 * 单项
	 * @return
	 */
	@RequestMapping("/single")
    public SysResult getStaticResourceMarket(@RequestBody Map<String,String> map){
		PageInfo<SingleServiceDto> singleServiceInfo = singleService.getSingleServiceInfo(map);
		Map<String,Object> resultMap = new HashMap<>();
		Map<String,Object> pageMap = new HashMap<>();
		resultMap.put("list", singleServiceInfo.getList());
		pageMap.put("total", singleServiceInfo.getTotal());
		resultMap.put("pageInfo", pageMap);
		 
		return SysResult.ok(resultMap);
    }
}
